function callback(data) {
    let list = document.querySelector('.listl');
    let res = data.result.map((elm) => {
        return elm[0]
    })
    let str = '';
    for (let i = 0; i < res.length; i++) {
        str += `<li>${res[i]}</li>`
    }
    list.innerHTML = str;
}


let ipt = document.querySelector('.ipt');
ipt.oninput = function() {
    const script = document.createElement('script');
    script.src = `https://suggest.taobao.com/sug?code=utf-8&q=${this.value}&extras=1&area=c2c&bucketid=atb_search&pid=mm_26632258_3504122_32538762&unid=&clk1=b2eaab8de96312e73c283c36b5186411&_=1655889314664&callback=callback`;
    document.body.appendChild(script);
    document.body.removeChild(script);
}